$(function(){
   $(".back").on('click',function () {
       window.location = '/order/index';
   });


    $('.update-order').on('click',function(){
        var form = $('#form1');
        $.ajax({
            'type':'POST',
            'url':'/order/update-order',
            'data':form.serialize(),
            'dataType':'json',
            'success':function(data)
            {
                layer.alert(data.msg);
                setTimeout(function () {
                    location.href = '/order/index';
                },1200);
            }
        });

    });
});